<template style="position: fixed; width: 100%; overflow-x: hidden;">
	<view class="content" :style="app_bg">
		<view class="topTitle" style="" :style="'top:'+zhuangtai+'px'">
			<view class="" style="font-size: 32rpx;">
				合成王者
			</view>
		</view>
		<block v-if="true">
			<!--  -->
			<image class="gifclass" :style="'left:'+giftLeft" v-if="gifclassFalse" @click="clickgift" :src="pubilcPopupImg.index_float_bag_icon" mode=""></image>
			<indexSynthesis 
				:appConfig="appConfig"
				:is_to_combined="is_to_combined" 
				:synthesisImg="synthesisImg" 
				:syncolor="syncolor" 
				@toExchange="goToexchange" 
				@synthesisOver="isSynthesisover" 
				@nextLogin="goToLogin" 
				@showLuckDraw="showLuckDraw" 
				:topheight="zhuangtai+52" 
				:card_list="cardlist" 
				:thisDataSyn="synthesisData" 
				:taskList="indexTaskList"
				@showTaskList="showtask"
				@luckLights="luckLightsIndex"
				:show_light_number="light_number"
				:show_light_syn="show_light"
			/>
			<indexCustomsreward ref="Customsreward" :clearance="clearance" :diyimage="synthesisImg" :clearancecolor="syncolor" @customsitem="redmoneyType1" @openAdVideoStart="openAdVideoStart" />
			<!-- <ourloading :active="loadingFirst" text=" "  /> -->
			<view class="" style="height: 100rpx;"></view>
			<block v-for="(item, index) in indextaskimageList" :key="index">
				<image @click="GoToTaskIndex" class="taskindeximage" :class="'image1'+index" :src="item.image" mode=""></image>
				<!-- <button v-if="item.type == 2" type="default" open-type="share" class="sharebtn" :class="'image'+index">
					<image class="imageshare" :src="item.image" mode=""></image>
				</button> -->
			</block>
			<!-- 礼物盒子弹出 -->
			<uni-popup ref="giftpopup" type="center" :maskClick="false">
				<view class="giftpopupclass" >
					<image class="bgimgpublic" @click="beforeGetGiftGoods" style="z-index: 1;" :src="pubilcPopupImg.index_float_bag_bg_image" mode=""></image>
					<image class="closegiftpopup" @click="closegiftpopup" :src="pubilcPopupImg.banner_btn_close" mode=""></image>
					<view class="font48 fontw500 text1 index-1" @click="beforeGetGiftGoods" :style="font_1st">开启随机礼包</view>
					<view class="font48 fontw500 index-1" @click="beforeGetGiftGoods" :style="font_1st" v-if="indexRedMoney.member_daily_free_count<=0">消耗
						<text :style="font_tips" v-if="indexRedMoney.cost_type == 1">{{appConfig.gold_coin_name}}{{indexRedMoney.cost_amount}}</text>
						<text :style="font_tips" v-if="indexRedMoney.cost_type == 2">{{appConfig.game_coin_name}}{{indexRedMoney.cost_amount}}</text>
						<text :style="font_tips" v-if="indexRedMoney.cost_type == 3">{{appConfig.exp_name}}{{indexRedMoney.cost_amount}}</text>
						<text :style="font_tips" v-if="indexRedMoney.cost_type == 4">{{appConfig.money_name}}{{indexRedMoney.cost_amount}}</text>
					</view>
					<view class="font48 fontw500" @click="beforeGetGiftGoods" :style="font_1st" v-if="indexRedMoney.member_daily_free_count>0">剩余{{indexRedMoney.member_daily_free_count||0}}次免费开启
					</view>
				</view>
			</uni-popup>
			<!-- 礼物盒子弹出 -->
			<!-- 领取礼物盒子弹出 -->
			<uni-popup ref="successgift" type="center" :maskClick="false">
				<view class="successsynpopup">
					<view class="successtop">
						<image class="bgimgpublic" :src="pubilcPopupImg.alert_success_image_1" mode=""></image>
						<text class="font48 fontw" style="margin-top: -19rpx;"
							:style="font_1st"
						>
							恭喜您
						</text>
					</view>
					<view class="successcenter">
						<image class="bgimg" :src="pubilcPopupImg.index_live_comment_bg_image_1" mode=""></image>
						<view class="successgoods">
							<image class="bgimgpublic" :src="giftOpenInfo.image" mode=""></image>
						</view>
					</view>
					<view class="text1 font36" :style="font_1st">
						恭喜您领取随机奖励获得<text :style="font_2nd">{{giftOpenInfo.name}}*{{giftOpenInfo.reward_amount}}</text>
					</view>
					<view class="successbtn" @click="giftopenaddress">
						<image class="bgimgpublic" :src="pubilcPopupImg.btn_sm_warm" mode=""></image>
						<text class="font36" :style="font_1st">领取</text>
					</view>
				</view>
			</uni-popup>
			<!-- 领取礼物盒子弹出 -->
			<!-- 未中奖弹出 -->
			<uni-popup ref="luckDrawfail" type="center" :maskClick="false">
				<view class="loadexchagepopup" :style="app_theme">
					<view class="exchagetop" :style="app_border_bg">
						<image @click="$refs.luckDrawfail.close()" class="closepopup" :src="pubilcPopupImg.btn_close" mode=""></image>
						<text class="font36 index-1" style="margin-top: 28rpx;" :style="font_1st">提示</text>
					</view>
					<text class="font30 text1" :style="font_1st">今日免费抽奖次数已用完，
						是否确认消耗{{indexRedMoneycast}}
						<text v-if="cost_type == 1">{{appConfig.gold_coin_name}}</text>
						<text v-if="cost_type == 2">{{appConfig.game_coin_name}}</text>
						<text v-if="cost_type == 3">{{appConfig.exp_name}}</text>
						<text v-if="cost_type == 4">{{appConfig.money_name}}</text>
						开启一次？
					</text>
					<view class="btnlist">
						<view class="btn" style="margin-right: 50rpx;" @click="twoStartlottery">
							<image class="bgimgpublic" style="z-index: 0;" :src="pubilcPopupImg.btn_xs_warm" mode=""></image>
							<text class="font30 index-1" :style="font_1st">确定</text>
						</view>
						<view class="btn" @click="$refs.luckDrawfail.close(),clickoneluttery = 0">
							<image class="bgimgpublic" style="z-index: 0;" :src="pubilcPopupImg.btn_xs_disabled" mode=""></image>
							<text class="font30 index-1" :style="font_1st">取消</text>
						</view>
					</view>
				</view>
			</uni-popup>
			<!-- 未中奖弹出 -->
			<!-- 抽奖规则 -->
			<uni-popup ref="luckDrawrule" type="center" :maskClick="false">
				<view class="loadexchagepopup" :style="app_theme">
					<view class="exchagetop" :style="app_border_bg">
						<image @click="closeluckDrawrule1" class="closepopup" :src="pubilcPopupImg.btn_close" mode=""></image>
						<text class="font36 index-1" style="margin-top: 28rpx;" :style="font_1st">抽奖规则</text>
					</view>
					<scroll-view scroll-y="true" class="textrule">
						<rich-text :nodes="desc" class="font30" style="width: 100%;" :style="font_1st"></rich-text>
					</scroll-view>
				</view>
			</uni-popup>
			<!-- 抽奖规则 -->
			<!-- 礼包兑换弹出 -->
			<uni-popup ref="exchangegift" type="center" :maskClick="false">
				<view class="loadexchagepopup" :style="app_theme">
					<view class="exchagetop" :style="app_border_bg">
						<image @click="$refs.exchangegift.close()" class="closepopup" :src="pubilcPopupImg.btn_close" mode=""></image>
						<text class="font36 index-1" style="margin-top: 28rpx;" :style="font_1st">提示</text>
					</view>
					<text class="font30 text1" :style="font_1st">今日免费礼包次数已用完，
						是否确认消耗{{indexRedMoney.cost_amount}} <text v-if="cost_type == 1">{{appConfig.gold_coin_name}}</text>
						<text v-if="cost_type == 2">{{appConfig.game_coin_name}}</text>
						<text v-if="cost_type == 3">{{appConfig.exp_name}}</text>
						<text v-if="cost_type == 4">{{appConfig.money_name}}</text>开礼包一次？
					</text>
					<view class="btnlist">
						<view class="btn" style="margin-right: 50rpx;" @click="twoexchangegift">
							<image class="bgimgpublic" style="z-index: 0;" :src="pubilcPopupImg.btn_xs_warm" mode=""></image>
							<text class="font30 index-1" :style="font_1st">确定</text>
						</view>
						<view class="btn" @click="$refs.exchangegift.close()">
							<image class="bgimgpublic" style="z-index: 0;" :src="pubilcPopupImg.btn_xs_disabled" mode=""></image>
							<text class="font30 index-1" :style="font_1st">取消</text>
						</view>
					</view>
				</view>
			</uni-popup>
			<!-- 礼包兑换弹出 -->
			<!-- 抽奖抽中弹出 -->
			<uni-popup ref="successLuckdraw" type="center" :maskClick="false">
				<view class="exchagepopup" :style="app_theme">
					<view class="exchagetop" :style="'background:'+publicTextColor.font_2nd_color_val+';'">
						<image @click="closelotterySuccess" class="closepopup" :src="pubilcPopupImg.btn_close" mode=""></image>
						<image class="imagetop" :src="pubilcPopupImg.alert_success_image_2" mode=""></image>
						<text class="font36 index-1" style="margin-top: 28rpx;" :style="font_1st">恭喜您</text>
					</view>
					<view class="centerimage">
						<image class="bgimgpublic" style="z-index: 0;" :src="pubilcPopupImg.index_live_comment_bg_image_1" mode=""></image>
						<image class="exchangegoodsimage" :src="lotteryinfo.image" mode=""></image>
					</view>
					<text class="font30 text1" :style="font_1st">恭喜您抽中奖品
						<text :style="font_tips">{{lotteryinfo.name}}*{{lotteryinfo.reward_amount}}</text>~
					</text>
					<view class="btn" v-if="lotteryinfo.type !=2" @click="closelotterySuccess">
						<image class="bgimgpublic" style="z-index: 0;" :src="pubilcPopupImg.btn_sm_warm" mode=""></image>
						<text class="font30 index-1" :style="font_1st">确定</text>
					</view>
					<view class="btn" v-else @click="lotteryaddress">
						<image class="bgimgpublic" style="z-index: 0;" :src="pubilcPopupImg.btn_sm_warm" mode=""></image>
						<text class="font30 index-1" :style="font_1st">领取</text>
					</view>
				</view>
			</uni-popup>
			<!-- 抽奖抽中弹出 -->
			<!-- 未中奖弹出 -->
			<uni-popup ref="failLuckdraw" type="center" :maskClick="false">
				<view class="exchagepopup" :style="app_theme">
					<view class="exchagetop" :style="'background:'+publicTextColor.font_2nd_color_val+';'">
						<image @click="closeluckDrawrule" class="closepopup" :src="pubilcPopupImg.btn_close" mode=""></image>
						<image class="imagetop" :src="pubilcPopupImg.alert_fail_image_2" mode=""></image>
						<text class="font36" :style="'margin-top:28rpx;z-index:1;color:#000000;'">很遗憾</text>
					</view>
					<view class="centerimagefail">
						<image class="bgimgpublic" style="z-index: 0;" :src="pubilcPopupImg.index_lottery_thx_image" mode=""></image>
					</view>
					<text class="font30 text1" :style="font_1st">
						感谢您的参与，继续努力~
					</text>
					<view class="btn" @click="closeluckDrawrule">
						<image class="bgimgpublic" style="z-index: 0;" :src="pubilcPopupImg.btn_sm_warm" mode=""></image>
						<text class="font30 index-1" :style="font_1st">确定</text>
					</view>
				</view>
			</uni-popup>
			<!-- 未中奖弹出 -->
			<!-- 抽奖记录弹出 -->
			<uni-popup ref="lottery_Record" type="center" :maskClick="false">
				<view class="record" :style="app_theme">
					<image @click="closedrawRecord" class="closepopup" :src="pubilcPopupImg.btn_close" mode=""></image>
					<view class="recordtitle" :style="font_1st+app_border_bottom">抽奖记录</view>
					<view class="titlechange" :style="app_border_bg">
						<view class="font34" @click="changerecord(1)" :style="recordchangeid == 1?font_1st:font_3rd">虚拟奖品</view>
						<view class="font34" @click="changerecord(2)" :style="recordchangeid == 2?font_1st:font_3rd">实物奖品</view>
					</view>
					<view class="listrecord">
						<scroll-view  scroll-y="true" style="height: 710rpx;" @scrolltolower="loadlotteryjoinmore">
							<view class="item" v-for="(item, index) in lotteryGoinList" :key="index" :style="app_border_bottom">
								<view class="infotext">
									<text class="font28" :style="'margin-bottom:15rpx;'+font_1st">{{item.lottery_name}}</text>
									<text class="font24" v-if="item.status == 1" :style="font_3rd">{{item.create_time}}</text>
									<text class="font24" v-if="item.status == 2" :style="font_3rd">{{item.send_time}}</text>
									<text class="font24" v-if="item.status == 3" :style="font_3rd">{{item.finish_time}}</text>
								</view>
								<view class="infotext">
									<text class="font28" :style="'margin-bottom:15rpx;'+font_1st">{{item.reward_amount}}</text>
									<text v-if="recordchangeid == 2 && item.status == 1" class="font24" :style="'text-align:right;'+font_tips">待发放</text>
									<text v-if="recordchangeid == 2 && item.status == 2" class="font24" :style="'text-align:right;color:'+:style="font_3rd"">已发放</text>
									<text v-if="recordchangeid == 2 && item.status == 3" class="font24" :style="'text-align:right;color:'+:style="font_3rd"">已完成</text>
								</view>
							</view>
						</scroll-view>
					</view>
				</view>
			</uni-popup>
			<!-- 抽奖记录弹出 -->
			<!-- 抽奖首页弹出 -->
			<uni-popup ref="lotterygoods" type="center" :maskClick="false">
				<view class="lotterygoods" :style="app_theme">
					<image @click="$refs.lotterygoods.close()" class="closepopup" :src="pubilcPopupImg.btn_close" mode=""></image>
					<view class="goodsindex">
						<view class="item1" 
							:style="lotteryId == 0?
							 'background: linear-gradient(0deg,'+publicTextColor.index_lottery_unselected_shadow_color_1+','+ publicTextColor.index_lottery_unselected_shadow_color_1+');'
							:'background: linear-gradient(0deg,'+publicTextColor.index_shadow_color_1+','+publicTextColor.index_shadow_color_2+');'"
						>
							<image class="itemimg" :src="lotteryList[0].image" mode=""></image>
							<view class="font30" :style="font_1st">{{lotteryList[0].name}}</view>
						</view>
						<view class="item1" 
							:style="lotteryId == 1?
							 'background: linear-gradient(0deg,'+publicTextColor.index_lottery_unselected_shadow_color_1+','+ publicTextColor.index_lottery_unselected_shadow_color_1+');'
							 :'background: linear-gradient(0deg,'+publicTextColor.index_shadow_color_1+','+publicTextColor.index_shadow_color_2+');'"
						>
							<image class="itemimg" :src="lotteryList[1].image" mode=""></image>
							<view class="font30" :style="font_1st">{{lotteryList[1].name}}</view>
						</view>
						<view class="item1"
							:style="lotteryId == 2?
							 'background: linear-gradient(0deg,'+publicTextColor.index_lottery_unselected_shadow_color_1+','+ publicTextColor.index_lottery_unselected_shadow_color_1+');'
							 :'background: linear-gradient(0deg,'+publicTextColor.index_shadow_color_1+','+publicTextColor.index_shadow_color_2+');'"
						>
							<image class="itemimg" :src="lotteryList[2].image" mode=""></image>
							<view class="font30" :style="font_1st">{{lotteryList[2].name}}</view>
						</view>
						<view class="item1"
							:style="lotteryId == 11?
							'background: linear-gradient(0deg,'+publicTextColor.index_lottery_unselected_shadow_color_1+','+ publicTextColor.index_lottery_unselected_shadow_color_1+');'
							:'background: linear-gradient(0deg,'+publicTextColor.index_shadow_color_1+','+publicTextColor.index_shadow_color_2+');'"
						>
							<image class="itemimg" :src="lotteryList[11].image" mode=""></image>
							<view class="font30" :style="font_1st">{{lotteryList[11].name}}</view>
						</view>
						<view class="item2">
							<image :src="pubilcPopupImg.index_lottery_lucky_light_icon" mode=""></image>
							<view class="font34" :style="'margin-bottom:5rpx;color:'+font_1st">当前幸运值</view>
							<view class="font34" :style="font_1st">{{lottery_number}}</view>
						</view>
						<view class="item1"
							:style="lotteryId == 3 ?
							 'background: linear-gradient(0deg,'+publicTextColor.index_lottery_unselected_shadow_color_1+','+ publicTextColor.index_lottery_unselected_shadow_color_1+');'
							 :'background: linear-gradient(0deg,'+publicTextColor.index_shadow_color_1+','+publicTextColor.index_shadow_color_2+');'"
						>
							<image class="itemimg" :src="lotteryList[3].image" mode=""></image>
							<view class="font30" :style="font_1st">{{lotteryList[3].name}}</view>
						</view>
						<view class="item1" style="margin-top: -58rpx;"
							:style="lotteryId == 10?
							 'background: linear-gradient(0deg,'+publicTextColor.index_lottery_unselected_shadow_color_1+','+ publicTextColor.index_lottery_unselected_shadow_color_1+');'
							 :'background: linear-gradient(0deg,'+publicTextColor.index_shadow_color_1+','+publicTextColor.index_shadow_color_2+');'"
						>
							<image class="itemimg" :src="lotteryList[10].image" mode=""></image>
							<view class="font30" :style="font_1st">{{lotteryList[10].name}}</view>
						</view>
						<view class="item3 font24" :style="font_3rd">
							点亮幸运灯，获得幸运值，幸运值越高，机会就越大,每日抽奖免费时间：{{daily_free_times}}
						</view>
						<view class="item1" style="margin-top: -58rpx;"
							:style="lotteryId == 4?
							 'background: linear-gradient(0deg,'+publicTextColor.index_lottery_unselected_shadow_color_1+','+ publicTextColor.index_lottery_unselected_shadow_color_1+');'
							 :'background: linear-gradient(0deg,'+publicTextColor.index_shadow_color_1+','+publicTextColor.index_shadow_color_2+');'"
						>
							<image class="itemimg" :src="lotteryList[4].image" mode=""></image>
							<view class="font30" :style="font_1st">{{lotteryList[4].name}}</view>
						</view>
						<view class="item1"
							:style="lotteryId == 9?
							 'background: linear-gradient(0deg,'+publicTextColor.index_lottery_unselected_shadow_color_1+','+ publicTextColor.index_lottery_unselected_shadow_color_1+');'
							 :'background: linear-gradient(0deg,'+publicTextColor.index_shadow_color_1+','+publicTextColor.index_shadow_color_2+');'"
						>
							<image class="itemimg" :src="lotteryList[9].image" mode=""></image>
							<view class="font30" :style="font_1st">{{lotteryList[9].name}}</view>
						</view>
						<view class="item4" @click="onestartstartlottery">
							<image class="bgimgpublic" style="z-index: 0;" :src="pubilcPopupImg.index_lottery_start_bg_image" mode=""></image>
							<text class="font34" :style="'margin-bottom:19rpx;'+font_1st">点击抽奖</text>
							<text class="font24" v-if="member_daily_free_count !=0" :style="'margin-bottom:5rpx;'+font_2nd">免费抽奖次数</text>
							<text class="font24" v-if="member_daily_free_count !=0" :style="font_tips">{{member_daily_free_count}}</text>
							<text class="font24" v-if="member_daily_free_count ==0 && cost_type == 1" :style="'margin-bottom:5rpx;'+font_2nd">消耗{{appConfig.gold_coin_name}}</text>
							<text class="font24" v-if="member_daily_free_count ==0 && cost_type == 1" :style="font_tips">{{cost_amount}}</text>
							<text class="font24" v-if="member_daily_free_count ==0 && cost_type == 2" :style="'margin-bottom:5rpx;'+font_2nd">消耗{{appConfig.game_coin_name}}</text>
							<text class="font24" v-if="member_daily_free_count ==0 && cost_type == 2" :style="font_tips">{{cost_amount}}</text>
							<text class="font24" v-if="member_daily_free_count ==0 && cost_type == 3" :style="'margin-bottom:5rpx;'+font_2nd">消耗{{appConfig.exp_name}}</text>
							<text class="font24" v-if="member_daily_free_count ==0 && cost_type == 3" :style="font_tips">{{cost_amount}}</text>
							<text class="font24" v-if="member_daily_free_count ==0 && cost_type == 4" :style="'margin-bottom:5rpx;'+font_2nd">消耗{{appConfig.money_name}}</text>
							<text class="font24" v-if="member_daily_free_count ==0 && cost_type == 4" :style="font_tips">{{cost_amount}}</text>
						</view>
						<view class="item1"
							:style="lotteryId == 5?
							 'background: linear-gradient(0deg,'+publicTextColor.index_lottery_unselected_shadow_color_1+','+ publicTextColor.index_lottery_unselected_shadow_color_1+');'
							 :'background: linear-gradient(0deg,'+publicTextColor.index_shadow_color_1+','+publicTextColor.index_shadow_color_2+');'"
						>
							<image class="itemimg" :src="lotteryList[5].image" mode=""></image>
							<view class="font30" :style="font_1st">{{lotteryList[6].name}}</view>
						</view>
						<view class="item1"
							:style="lotteryId == 8?
							 'background: linear-gradient(0deg,'+publicTextColor.index_lottery_unselected_shadow_color_1+','+ publicTextColor.index_lottery_unselected_shadow_color_1+');'
							 :'background: linear-gradient(0deg,'+publicTextColor.index_shadow_color_1+','+publicTextColor.index_shadow_color_2+');'"
						>
							<image class="itemimg" :src="lotteryList[8].image" mode=""></image>
							<view class="font30" :style="font_1st">{{lotteryList[8].name}}</view>
						</view>
						<view class="item1"
							:style="lotteryId == 7?
							'background: linear-gradient(0deg,'+publicTextColor.index_lottery_unselected_shadow_color_1+','+ publicTextColor.index_lottery_unselected_shadow_color_1+');'
							:'background: linear-gradient(0deg,'+publicTextColor.index_shadow_color_1+','+publicTextColor.index_shadow_color_2+');'"
						>
							<image class="itemimg" :src="lotteryList[7].image" mode=""></image>
							<view class="font30" :style="font_1st">{{lotteryList[7].name}}</view>
						</view>
						<view class="item1" 
							:style="lotteryId == 6?
							 'background: linear-gradient(0deg,'+publicTextColor.index_lottery_unselected_shadow_color_1+','+ publicTextColor.index_lottery_unselected_shadow_color_1+');'
							 :'background: linear-gradient(0deg,'+publicTextColor.index_shadow_color_1+','+publicTextColor.index_shadow_color_2+');'"
						>
							<image class="itemimg" :src="lotteryList[6].image" mode=""></image>
							<view class="font30" :style="font_1st">{{lotteryList[6].name}}</view>
						</view>
					</view>
					<view class="bottomtext font24" :style="font_3rd">
						<view class="text1" @click="opendrawrule">抽奖规则</view>
						<view class="text1" @click="opendrawRecord(1)">抽奖记录</view>
					</view>
				</view>
			</uni-popup>
			<!-- 抽奖首页弹出 -->
			
			<uni-popup ref="selectaddress" type="bottom">
				<view class="addresspopup" :style="app_theme">
					<view class="font30 closepopup" @click="closeAddress" :style="font_1st">取消</view>
					<view class="font36" style="margin-bottom: 49rpx;" :style="font_1st">收货地址</view>
					<scroll-view scroll-y="true" style="height: 530rpx;" >
						<block v-for="(item, index) in addressList" :key="index">
							<view class="addressitem" :style="app_border_bg">
								<view @click="enterPostExchange(item.id)">
									<view class="textname font28" :style="font_1st">{{item.username}}    {{item.mobile}}</view>
									<view class="font28 textaddress" :style="font_1st+'border-bottom:2rpx solid '+publicTextColor.app_theme_color+';'">{{item.province}}{{item.city}}{{item.district}}{{item.address}}</view>
								</view>
								<view class="btnindex">
									<view class="defaultaddress" v-if="item.is_default == 1">
										<image :src="pubilcPopupImg.user_address_select_icon" mode=""></image>
										<view class="font28" :style="font_2nd">默认地址</view>
									</view>
									<view class="defaultaddress" v-else @click="setAddressDefault(item)">
										<image :src="pubilcPopupImg.user_address_unselect_icon" mode=""></image>
										<view class="font28" :style="font_3rd">设置默认地址</view>
									</view>
									<view class="changeaddress" >
										<view class="image1" style="margin-right: 31rpx;" @click="addressChange(item)">
											<image :src="pubilcPopupImg.user_address_alter_icon" mode=""></image>
											<view class="" :style="font_3rd">修改</view>
										</view>
										<view class="image1" @click="deleteAddress(item.id)">
											<image :src="pubilcPopupImg.user_address_del_icon" mode=""></image>
											<view class="" :style="font_3rd">删除</view>
										</view>
									</view>
								</view>
							</view>
						</block>
					</scroll-view>
					<view class="btn" @click="addressnew">
						<image class="bgimgpublic" style="z-index: 0;" :src="pubilcPopupImg.btn_sm_warm" mode=""></image>
						<text class="font30 index-1" :style="font_1st">新增收货地址</text>
					</view>
				</view>
			</uni-popup>
			<uni-popup ref="addaddress" type="bottom">
				<view class="addaddresspopup" :style="app_theme">
					<view class="font30 closepopup" @click="closesaveaddress" :style="font_1st">取消</view>
					<view class="font36" style="margin-bottom: 49rpx;" :style="font_1st">收货地址</view>
					<view class="addressitem" :style="app_border_bg">
						<text class="textname" :style="font_1st">姓　　名：</text>
						<input class="inputclass" @input="setusername" type="text" :style="font_1st" :value="username" :placeholder-style="font_3rd" placeholder="请输入姓名" />
					</view>
					<view class="addressitem" :style="app_border_bg">
						<text class="textname" :style="font_1st">电　　话：</text>
						<input class="inputclass" @input="setmobile" type="text" :style="font_1st" :value="mobile" :placeholder-style="font_3rd" placeholder="请输入手机或0开头的固定电话" />
					</view>
					<view class="addressitem" :style="app_border_bg+font_1st">
						<text class="textname">地　　区：</text>
						<picker @change="bindPickerChange" mode="region" style="width: 400rpx;height: 30rpx;">
							<view class="uni-input">{{province}}{{city}}{{district}}</view>
						</picker>
					</view>
					<view class="addressitem" :style="app_border_bg">
						<text class="textname" :style="font_1st">详细地址：</text>
						<input class="inputclass" @input="setaddress" type="text" :style="font_1st" :value="address" :placeholder-style="font_3rd" placeholder="请输入街道、门牌号等信息" />
					</view>
					<view class="addressitemdefault" :style="app_border_bg">
						<text class="textname" :style="font_1st">设为默认</text>
						<switch style="transform: scale(0.7);" color="#2EC56A" :checked="false" @change="switchChange" />
					</view>
					<view class="btn" @click="saveaddresspopup">
						<image class="bgimgpublic" style="z-index: 0;" :src="pubilcPopupImg.btn_sm_warm" mode=""></image>
						<text class="font30 index-1" :style="font_1st">保存</text>
					</view>
				</view>
			</uni-popup>
			<uni-popup ref="getScrollMethods" type="center" :maskClick="false">
				<view class="getScrollpopup" :style="app_theme">
					<view class="exchagetop" :style="app_border_bg">
						<image @click="$refs.getScrollMethods.close()" class="closepopup" :src="pubilcPopupImg.btn_close" mode=""></image>
						<text class="font34" :style="font_1st">获取卷轴的几种方法</text>
					</view>
					<scroll-view :scroll-y="true" style="height: 590rpx;">
						<block v-for="(item, index) in taskList" :key="index">
							<view class="itemindex" :style="app_border_bottom">
								<view class="iteminfo">
									<image :src="item.image" mode=""></image>
									<view class="itemtext">
										<text class="text1 font30" :style="'color:'+syncolor.font_4th_color+';'">{{item.name}}</text>
										<text class="font28" v-if="item.is_reward_money == 1" :style="font_3rd">{{appConfig.money_name}}{{item.reward_money_min}}~{{item.reward_money_max}}</text>
										<text class="font28" v-if="item.is_reward_gold_coin == 1" :style="font_3rd">{{appConfig.gold_coin_name}}{{item.reward_gold_coin_min}}~{{item.reward_gold_coin_max}}</text>
										<text class="font28" v-if="item.is_reward_game_coin == 1" :style="font_3rd">{{appConfig.game_coin_name}}{{item.reward_game_coin_min}}~{{item.reward_game_coin_max}}</text>
										<text class="font28" v-if="item.is_reward_exp == 1" :style="font_3rd">{{appConfig.exp_name}}：{{item.reward_exp_min}}~{{item.reward_exp_max}}</text>
										<text class="font28" v-if="item.is_card == 1" :style="font_3rd">卡片{{item.card_amount_min}}~{{item.card_amount_max}}</text>
										<text class="font28" v-if="item.is_super_card == 1" :style="font_3rd">万能卡{{item.super_card_min}}~{{item.super_card_max}}</text>
									</view>
								</view>
								<view class="btn" v-if="item.member_task_status == 0 && item.type !=2 && item.cd_second<=0" @click="taskLookAdVideo(item.ad_unit,item.ad_type,item.id,item.ad_click,item.ad_type)">
									<image class="bgimgpublic" style="z-index: 1;" :src="synthesisImg.btn_xs_disabled" mode=""></image>
									<text class="font30 index-1" :style="font_1st" v-if="item.type == 1">{{item.member_task_going}}/{{item.sign_day}}</text>
									<text class="font30 index-1" :style="font_1st" v-if="item.type == 3">{{item.member_task_going}}/{{item.level}}</text> 
									<text class="font30 index-1" :style="font_1st" v-if="item.type == 4">{{item.member_task_going}}/{{item.ad_amount}}</text> 
									<text class="font30 index-1" :style="font_1st" v-if="item.type == 5">{{item.member_task_going}}/{{item.answer_times}}</text> 
									<text class="font30 index-1" :style="font_1st" v-if="item.type == 6">{{item.member_task_going}}/{{item.card_combine}}</text> 
								</view>
								<button class="btn" type='default' open-type="share" v-if="item.member_task_status == 0 && item.type ==2 && item.cd_second<=0">
									<image class="bgimgpublic" style="z-index: 1;" :src="synthesisImg.btn_xs_disabled" mode=""></image>
									<text class="font30 index-1" :style="font_1st">
										<text v-if="item.type == 2">{{item.invite_member_amount}}/{{item.amount}}</text> 
									</text>
								</button>
								<view class="btn" v-if="item.cd_second>0">
									<text class="font30 index-1" :style="font_1st">{{item.cd_second}}</text>
								</view>
								<view class="btn" v-if="item.member_task_status == 2 && item.cd_second<=0">
									<image class="bgimgpublic" style="z-index: 1;" :src="synthesisImg.btn_xs_primary" mode=""></image>
									<text class="font30 index-1" :style="font_1st">已完成</text>
								</view>
								<view class="btn" v-if="item.member_task_status == 1 && item.cd_second<=0" @click="taskcompleteClick(item,index)">
									<image class="bgimgpublic" style="z-index: 1;" :src="synthesisImg.btn_xs_warm" mode=""></image>
									<text class="font30 index-1" :style="font_1st">领取</text>
								</view>
							</view>
						</block>
					</scroll-view>
				</view>
			</uni-popup>
			<uni-popup ref="cardAd" type="center">
				<view class="showcardclass">
					<image @click="$refs.cardAd.close()" class="closeimage" :src="synthesisImg.banner_btn_close" mode=""></image>
					<view class="cardinfo">
						<image class="adimage" src="../../static/adpopup1.png" mode=""></image>
						<view class="text1 font36 fontw"></view>
					</view>
					<!-- #ifdef MP-WEIXIN -->
					<view v-if="cardadid != '' && ad_type == 3 " class="" style="display: flex;justify-content: center; margin:0 auto; width: 680rpx;">
						<ad v-if="cardadid != ''" :unit-id="cardadid" ad-type="video"></ad>
					</view>
					<view v-if="cardadid != '' && ad_type == 2 " class="" style="display: flex;justify-content: center;margin:0 auto; width: 680rpx;">
						<ad v-if="cardadid != ''" :unit-id="cardadid" ad-type="banner"></ad>
					</view>
					<!-- #endif -->
				</view>
			</uni-popup>
			<uni-popup ref="taskcomplete" type="center">
				<view class="successsynpopup1">
					<view class="successtop">
						<image class="bgimgpublic" :src="synthesisImg.alert_success_image_1" mode=""></image>
						<text class="font48 fontw"  style="margin-top: -19rpx;"
							:style="font_1st"
						>
							恭喜您
						</text>
					</view>
					<view class="successcenter">
						<view class="goodsimg">
							<image class="bgimg" :src="synthesisImg.index_live_comment_bg_image_1" mode=""></image>
							<view class="successgoods">
								<image class="bgimgpublic" v-if="taskItem.is_reward_money == 1" :src="appConfig.money_icon" mode=""></image>
								<image class="bgimgpublic" v-else-if="taskItem.is_reward_gold_coin == 1" :src="appConfig.gold_coin_icon" mode=""></image>
								<image class="bgimgpublic" v-else-if="taskItem.is_reward_game_coin == 1" :src="appConfig.game_coin_icon" mode=""></image>
								<image class="bgimgpublic" v-else-if="taskItem.is_reward_exp == 1" :src="appConfig.exp_icon" mode=""></image>
								<!-- <image class="bgimgpublic" v-else-if="taskItem.is_card == 1" :src="appConfig.exp_icon" mode=""></image> -->
								<image class="bgimgpublic" v-else-if="taskItem.is_super_card == 1" :src="appConfig.super_card_icon" mode=""></image>
							</view>
						</view>
						<text class="successtext font36" :style="font_1st">恭喜您完成任务获得
							<text v-if="taskItem.is_reward_money == 1" :style="font_2nd">{{appConfig.money_name}}*{{taskItem.reward_money}}</text>,
							<text v-if="taskItem.is_reward_gold_coin == 1" :style="font_2nd">{{appConfig.gold_coin_name}}*{{taskItem.reward_gold_coin}}</text>,
							<text v-if="taskItem.is_reward_game_coin == 1" :style="font_2nd">{{appConfig.game_coin_name}}*{{taskItem.reward_game_coin}}</text>,
							<text v-if="taskItem.is_reward_exp == 1" :style="font_2nd">{{appConfig.exp_name}}*{{taskItem.reward_exp}}</text>,
							<text v-if="taskItem.is_card == 1" :style="font_2nd">{{taskItem.card_list.name}}*{{taskItem.card_amount}}</text>,
							<text v-if="taskItem.is_super_card == 1" :style="font_2nd">{{appConfig.money_name}}*{{taskItem.super_card}}</text>,
							~
						</text>
					</view>
					<view class="successbtn" @click="getScrollClick">
						<image class="bgimgpublic" :src="synthesisImg.btn_sm_warm" mode=""></image>
						<text class="font36" :style="font_1st">我知道了</text>
					</view>
				</view>
			</uni-popup>
			<!-- 升级奖励 -->
			<uni-popup ref="lvpopup" type="center" :maskClick="false">
				<view class="exchagepopup" :style="app_theme">
					<view class="exchagetop" :style="app_border_bg">
						<image @click="closelvpopup" class="closepopup" :src="pubilcPopupImg.btn_close" mode=""></image>
						<image class="imagetop" :src="pubilcPopupImg.alert_success_image_2" mode=""></image>
						<text class="font36 index-1" style="margin-top: 28rpx;" :style="font_1st">恭喜您</text>
					</view>
					<text class="font30" style="margin-bottom: 68rpx;margin-top: 55rpx;" :style="font_1st">
						恭喜您升至 <text class="font36 fontw" :style="font_tips">{{level_reward.level_name}}</text> 成功
					</text>
					<view class="lvgoods">
						<view class="goodsitem" v-if="level_reward.reward_gold_coin!=0">
							<image class="goodsimagelv" :src="appConfig.gold_coin_icon" mode=""></image>
							<text class="font30" :style="font_tips">{{appConfig.gold_coin_name}}X{{level_reward.reward_gold_coin}}</text>
						</view>
						<view class="goodsitem" v-if="level_reward.reward_game_coin!=0">
							<image :src="appConfig.game_coin_icon" mode=""></image>
							<text class="font30" :style="font_tips">{{appConfig.game_coin_name}}X{{level_reward.reward_game_coin}}</text>
						</view>
						<view class="goodsitem" v-if="level_reward.reward_exp!=0">
							<image class="goodsimagelv" :src="appConfig.exp_icon" mode=""></image>
							<text class="font30" :style="font_tips">{{appConfig.exp_name}}X{{level_reward.reward_exp}}</text>
						</view>
						<view class="goodsitem" v-if="level_reward.reward_super_card!=0">
							<image class="goodsimagelv" :src="appConfig.super_card_image" mode=""></image>
							<text class="font30" :style="font_tips">{{appConfig.super_card_name}}X{{level_reward.reward_super_card}}</text>
						</view>
						<view class="goodsitem" v-if="level_reward.reward_card_amount!=0">
							<image class="goodsimagelv" :src="level_reward.card_image" mode=""></image>
							<text class="font30" :style="font_tips">{{level_reward.card_name}}{{level_reward.reward_card_amount}}</text>
						</view>
						<!-- <view class="goodsitem" v-if="level_reward.reward_money!=0">
							<image class="goodsimagelv" :src="level_reward.level_image" mode=""></image>
							<text class="font30" :style="font_tips">红包X{{level_reward.reward_money}}</text>
						</view> -->
					</view>
					<view class="doublelv" @click="getLevel_reward_first(1)">
						<image class="bgimgpublic" style="z-index: 0;" :src="pubilcPopupImg.btn_sm_warm" mode=""></image>
						<image class="videoclass" :src="pubilcPopupImg.btn_ad_unit" style="" mode=""></image>
						<text class="font36 index-1" :style="font_1st">{{level_reward.reward_rewarded_btn}}（{{level_reward.reward_rewarded_multiple}}倍）</text>
					</view>
					<text class="font36 index-1" @click="getlevel_reward" :style="font_3rd">直接普通领取</text>
				</view>
				<view class="font36" style="margin-top: 40rpx;text-align: center;" :style="font_1st" @click="closelvpopup">放弃领取</view>
			</uni-popup>
			<!-- 升级奖励 -->
			<!-- 升级奖励 -->
			<uni-popup ref="lvmoneypopup" type="center" :maskClick="false">
				<view class="exchagepopup" :style="app_theme">
					<view class="exchagetop" style="margin-bottom: 40rpx;" :style="app_border_bg">
						<image @click="$refs.lvmoneypopup.close()" class="closepopup" :src="pubilcPopupImg.btn_close" mode=""></image>
						<image class="imagetop" :src="pubilcPopupImg.alert_success_image_2" mode=""></image>
						<text class="font36 index-1" style="margin-top: 28rpx;" :style="font_1st">恭喜您</text>
					</view>
					<text class="font30" style="margin-bottom: 68rpx;" :style="font_1st">
						恭喜您获得升级红包
					</text>
					<view class="lvgoods">
						<view class="moneyred" v-if="level_reward.reward_money!=0">
							<image :src="pubilcPopupImg.level_up_red_packet_image" mode=""></image>
							<text class="font60 fontw" :style="'margin-top:30rpx;z-index:1;color:#E92513;'"><text class="font30">￥</text> {{level_reward.reward_money}}</text>
						</view>
					</view>
					<view class="doublelv" @click="getLevel_reward_first(2)">
						<image class="bgimgpublic" style="z-index: 0;" :src="pubilcPopupImg.btn_sm_warm" mode=""></image>
						<image class="videoclass" :src="pubilcPopupImg.btn_ad_unit" style="" mode=""></image>
						<text class="font36 index-1" :style="font_1st">{{level_reward.reward_rewarded_btn}}（{{level_reward.reward_rewarded_multiple}}倍）</text>
					</view>
					<text class="font36 index-1" @click="getlevel_reward_money" :style="font_3rd">直接普通领取</text>
				</view>
				<view class="font36" style="margin-top: 40rpx;text-align: center;" :style="font_1st" @click="$refs.lvmoneypopup.close()">放弃领取</view>
			</uni-popup>
			<!-- 升级奖励 -->
		</block>
		<view class="footTabList" :style="app_theme+(is_iphone?'padding-bottom:40rpx;':'padding-bottom:10rpx;')">
			<view class="listitem" @click="goToTab(item.url,item.url_name)" v-for="(item, index) in menu" :key="index">
				<image :src="item.name=='首页'?item.icon_selected : item.icon" mode=""></image>
				<view  :style="item.name=='首页'? 'color:'+item.font_color_selected:'color:'+item.font_color">{{item.name}}</view>
			</view>
		</view>
	</view>
</template>

<script> 
	import indexSynthesis from '../../diyComponents/Synthesis/indexSynthesis.vue'
	import indexCustomsreward from '../../diyComponents/Customsreward/indexCustoms.vue'
	var util = require('@/js/util.js')
	export default {
		components:{
			indexSynthesis,
			indexCustomsreward
		},
		data() {
			return {
				token:"",
				is_iphone:false,
				lotteryId:0,
				pubilcPopupImg:'',
				publicTextColor:'',
				synthesisImg:'',
				loadingFirst:true,
				zhuangtai:0,
				synthesisData:{},
				recordchangeid:1,
				menu:[],
				cardlist:'',
				clearance:"",
				resData:'',
				lotteryList:[],
				cost_type:1,
				cost_amount:0,
				daily_free_times:"",
				member_daily_count:0,
				member_daily_free_count:0,
				rewarded_ad_unit:0,
				desc:'',
				lotteryinfo:"",
				lotterytype:1,
				lotterypage:1,
				lotteryGoinList:[],
				question_cost_amount:0,
				question_cost_type:0,
				loadOver:0,
				giftOpenInfo:"",
				addressList:[],
				isDefault:false,
				username:"",
				mobile:"",
				province:"请选择地址",
				city:"",
				district:"",
				address:"",
				addressitem:'',
				is_changeorAdd:0,
				lotteryorgift:1,
				dhhba:'dhhba0 8s', //dhhba0 8s
				dhhbaInterVal:'',
				configNumber:0,
				configLength:0,
				syncolor:'',
				super_card:'',
				is_to_combined:0,
				appConfig:'',
				taskList:'',
				task_id:'',
				ad_click:'',
				openVideo:null,
				isclickcardad:false,
				cardadid:'',
				is_ad_click:false,
				cdTaskList:[],
				indexTaskList:'',
				level_reward:'',
				is_rewarded_video_ad:0,
				taskItem:"",
				taskIndex:'',
				is_rewarded_video_ad_money:0,
				redmoneyType:0,
				indexRedMoney:'',
				indexRedMoneycast:0,
				indextaskimageList:[],
				parent_id:'',
				expNumber:0,
				clickoneluttery:0,
				is_deleteAddress:false,
				is_reward_money:0,
				getGiftitem:'',
				gifclassFalse:true,
				giftLeft:0,
				lottery_number:0,
				rewarded_ad_unit_light:"",
				show_light:false,
				light_number:60,
				card_alart_interval:'',
				gif_class_interval:''
			}
		},
		watch:{
			loadOver:{
				handler(newValue,oldValue){
					for(let key in this.resData.card_list){
						this.cardlist[key].member_card = this.resData.card_list[key].member_card
					}
				},
				deep:true
			},
		},
		created() {
			uni.hideTabBar()
		},
		onHide() {
			clearInterval(this.card_alart_interval)
			for(let key in this.cdTaskList){
				console.log()
				clearInterval(this.cdTaskList[key])
			}
			if(this.ad_click == 1){
				this.is_ad_click = true
			}
			if(this.isclickcardad){
				this.clickcardad = true
			}
		},
		onUnload() {
			clearInterval(this.gif_class_interval)
			clearInterval(this.card_alart_interval)
		},
		onLoad(e) {
			this.lottery_number = uni.getStorageSync("lottery_number")
			this.setcolorConfig()
			this.getIndexInfo()
			let that = this
			let aniosgaodu = 0
			uni.getSystemInfo({
				success: function(res) {
					console.log(res);
					that.zhuangtai = res.statusBarHeight;
					var a = res.model.split(' ');
					if (a[0] == 'iPhone') {
						aniosgaodu = 44;
						that.is_iphone = true
					} else {
						aniosgaodu = 48;
					}
					that.zhuangtai = parseInt(that.zhuangtai)+4
					console.log(that.zhuangtai)
				}
			});
			
		},
		onShow() {
			this.token = uni.getStorageSync("token")
			this.red_packetIndex()
			// this.getExpNumber()
			this.showIndexInfo()
			this.showdhhb()
			this.getTaskList()
			this.startGift()
			
			if(this.clickcardad){
				this.postTaskVideo()
			}
		},
		onShareAppMessage() { // 分享 buttom share
			return {
				title: '合成王者',
				path: '/pages/index/index?parent_id='+uni.getStorageSync('member_id')
			}
		},
		computed:{
			app_border_bg(){
				return `background:${this.publicTextColor.app_border_color};`
			},
			user_margin_top(){
				return `margin-top:${(this.zhuangtai+52)}px;background:${this.publicTextColor.app_theme_color};`
			},
			page_top(){
				return `margin-top:${(this.zhuangtai+52)}px;`
			},
			app_border_top(){
				return `border-top:2rpx solid ${this.publicTextColor.app_border_color};`
			},
			app_border_bottom(){
				return `border-bottom:2rpx solid ${this.publicTextColor.app_border_color};`
			},
			app_border(){
				return `border:2rpx solid ${this.publicTextColor.app_border_color};`
			},
			app_theme(){
				return `background:${this.publicTextColor.app_theme_color};`
			},
			app_bg(){
				return `background:${this.publicTextColor.app_bg_color};`
			},
			font_4th(){
				return `color:${this.publicTextColor.font_4th_color};`
			},
			font_3rd(){
				return `color:${this.publicTextColor.font_3rd_color};`
			},
			font_2nd(){
				return `color:${this.publicTextColor.font_2nd_color};`
			},
			font_1st(){
				return `color:${this.publicTextColor.font_1st_color};`
			},
			auxColor(){
				return `color:${this.publicTextColor.auxColor};`
			},
			font_tips(){
				return `color:${this.publicTextColor.font_tips_color};`
			},
		},
		methods: {
			startGift(){
				let _self = this
				_self.giftLeft = Math.ceil(Math.random()*700)+'rpx'
				_self.gif_class_interval = setInterval(()=>{
					_self.gifclassFalse = !_self.gifclassFalse
					_self.giftLeft = Math.ceil(Math.random()*700)+'rpx'
					console.log("111",_self.gifclassFalse)
				},20000)
			},
			bindPickerChange(e) {
				this.province  = e.detail.value[0]
				this.city = e.detail.value[1]
				this.district = e.detail.value[2]
			},
			openAdVideoStart(type){
				if(type){
					this.lookAdVideo(this.indexRedMoney.rewarded_ad_unit,5)
				}
			},
			redmoneyType1(item){
				this.getGiftitem = item
				this.redmoneyType = 5
			},
			getGiftenter(){
				let _self = this
				uni.request({
					url: util.getUrl("question/section_reward"),
					header: {
						'content-type': 'application/x-www-form-urlencoded',
						'Authori-zation':uni.getStorageSync("token")
					},
					data:{
						section_id:_self.getGiftitem.id
					},
					method: 'POST',
					success: res => {
						if(res.data.code == 1){
							console.log("???!!!")
							_self.$refs.Customsreward.$refs.successScroll.close()
							uni.showToast({
								title:res.data.msg,
								icon: 'success'
							})
							_self.updateCustomsreward()
						}else{
							_self.$refs.Customsreward.$refs.successScroll.close()
							uni.showToast({
								title:res.data.msg,
								icon: 'success'
							})
						}
					}
				});
			},
			GoToTaskIndex(){
				uni.switchTab({
					url:'../task/index'
				})
			},
			closelvpopup(){
				this.$refs.lvpopup.close()
				if(this.is_reward_money == 1){
					this.$refs.lvmoneypopup.open()
				}
			},
			taskCd_second(index){
				this.cdTaskList[index] = setInterval(()=>{
					this.taskList[index].cd_second -- 
					if(this.taskList[index].cd_second<=0){
						clearInterval(this.cdTaskList[index])
					}
				},1000)
			},
			getScrollClick(){
				this.$refs.taskcomplete.close()
				this.$refs.getScrollMethods.open()
			},
			luckLightsIndex(data){
				if(data){
					this.lookAdVideo(this.rewarded_ad_unit_light,8)
				}
			},
			showtask(data){
				if(data){
					this.$refs.getScrollMethods.open()
				}
			},
			red_packetIndex(){
				let _self = this
				uni.request({
					url: util.getUrl("red_packet/index"),
					header: {
						'content-type': 'application/x-www-form-urlencoded',
						'Authori-zation':uni.getStorageSync("token")
					},
					data:{
					},
					method: 'POST',
					success: res => {
						if(res.data.code == 1){
							_self.indexRedMoney = res.data.data
							_self.indexRedMoneycast = res.data.data.cost_amount
						}else{
						}
					}
				});
			},
			getExpNumber(){
				let _self = this
				uni.request({
					url: util.getUrl("index/level_percent"),
					header: {
						'content-type': 'application/x-www-form-urlencoded',
						'Authori-zation':uni.getStorageSync("token")
					},
					data:{
					},
					method: 'POST',
					success: res => {
						if(res.data.code == 1){
							_self.expNumber = res.data.data
						}else{
							
						}
					}
				});
			},
			taskcompleteClick(item,index){
				let _self = this
				_self.taskItem = item
				_self.taskIndex = index
				uni.request({
					url: util.getUrl("task/finish"),
					header: {
						'content-type': 'application/x-www-form-urlencoded',
						'Authori-zation':uni.getStorageSync("token")
					},
					data:{
						task_id:item.id
					},
					method: 'POST',
					success: res => {
						if(res.data.code == 1){
							console.log(res.data.data)
							_self.$refs.taskcomplete.open()
							_self.$refs.getScrollMethods.close()
							_self.getTaskList()
						}else{
							if(res.data.code == 500){
								uni.navigateTo({
									url:'../../pages/login/login'
								})
							}
							uni.showToast({
								title:res.data.msg,
								icon:'none'
							})
						}
					}
				});
			},
			getlevel_reward(){
				let _self = this
				uni.request({
					url: util.getUrl("member/level_reward"),
					header: {
						'content-type': 'application/x-www-form-urlencoded',
						'Authori-zation':uni.getStorageSync("token")
					},
					data:{
						level_reward_id:_self.level_reward.id,
						is_rewarded_video_ad:_self.is_rewarded_video_ad
					},
					method: 'POST',
					success: res => {
						if(res.data.code == 1){
							_self.is_rewarded_video_ad = 0
							uni.showToast({
								title:'领取成功',
								icon:'none'
							})
							_self.closelvpopup()
						}else{
							_self.closelvpopup()
							if(res.data.code == 500){
								uni.navigateTo({
									url:'../../pages/login/login'
								})
							}
							uni.showToast({
								title:res.data.msg,
								icon:'none'
							})
						}
					}
				});
			},
			getLevel_reward_first(type){
				console.log("this.level_reward.rewarded_ad_unit",this.level_reward.rewarded_ad_unit)
				if(type == 1){
					this.lookAdVideo(this.level_reward.rewarded_ad_unit,2)
				}else if(type == 2){
					this.lookAdVideo(this.level_reward.rewarded_ad_unit,3)
				}
			},
			getlevel_reward_money(){
				let _self = this
				uni.request({
					url: util.getUrl("member/level_red_packet"),
					header: {
						'content-type': 'application/x-www-form-urlencoded',
						'Authori-zation':uni.getStorageSync("token")
					},
					data:{
						level_reward_id:_self.level_reward.id,
						is_rewarded_video_ad:_self.is_rewarded_video_ad_money
					},
					method: 'POST',
					success: res => {
						if(res.data.code == 1){
							uni.showToast({
								title:'领取成功',
								icon:'none'
							})
							_self.is_rewarded_video_ad_money = 0
							_self.redmoneyType = 0
							_self.$refs.lvmoneypopup.close()
						}else{
							_self.is_rewarded_video_ad_money = 0
							_self.$refs.lvmoneypopup.close()
							if(res.data.code == 500){
								uni.navigateTo({
									url:'../../pages/login/login'
								})
							}
							uni.showToast({
								title:res.data.msg,
								icon:'none'
							})
						}
					}
				});
			},
			taskLookAdVideo(ad_unit,type,task_id,ad_click,ad_type){
				this.task_id = task_id
				this.ad_click = ad_click
				if(type == 1){
					this.lookAdVideo(ad_unit,1)
				}else{
					this.ad_type = ad_type
					this.cardadid = ad_unit
					this.isclickcardad = true
					this.$refs.cardAd.open()
					if(this.ad_click !=1){
						this.postTaskVideo()
					}
				}
			},
			lookAdVideo(adUnitId,type){
				let _self = this
				console.log(adUnitId,type)
				_self.redmoneyType = type
				
				if(_self.openVideo == null){
					_self.openVideo = uni.createRewardedVideoAd({
						adUnitId:adUnitId,
					})
					_self.openVideo.load((resLoad)=>{
						console.log("adload",resLoad)
					})
					_self.openVideo.onError(function(eError){
						console.log("eError",eError)
					})
					_self.openVideo.onClose((res)=>{
						if(res && res.isEnded){
							console.log(0)
							if(_self.redmoneyType == 1){
								console.log(1)
								if(_self.ad_click == 1 ){
									if(_self.is_ad_click){
										_self.postTaskVideo()
									}else{
										uni.showToast({
											title:"未点击视频下方链接，观看失败！",
											icon:'none'
										})
										_self.is_ad_click = false
									}
								}else{
									_self.postTaskVideo()
								}
							}
							if(_self.redmoneyType == 2){
								console.log(1)
								_self.is_rewarded_video_ad = 1
								_self.getlevel_reward()
							}
							if(_self.redmoneyType == 3){
								console.log(1)
								_self.is_rewarded_video_ad_money = 1
								_self.getlevel_reward_money()
							}
							if(_self.redmoneyType == 4){
								console.log(1)
								_self.$refs.exchangegift.close()
								_self.getGiftGoods()
							}
							if(_self.redmoneyType == 5){
								_self.getGiftenter()
							}
							if(_self.redmoneyType == 8){
								_self.show_light = true
								_self.light_number = 60
								_self.startLightBackTime()
							}
						}
					})
				}
				uni.showModal({
					title: '提示',
					content: '观看视频以继续' ,
					success: function (res) {
						if (res.confirm) {
							console.log('用户点击确定');
							_self.openVideo.show()
								.catch(() => {
									_self.openVideo.load()
										.then(() => {
											_self.openVideo.show()
										})
										.catch(err => {
											console.log('激励视频 广告显示失败')
											_self.active = false
											uni.showToast({
												title: '暂无激励视频',
												icon: 'none',
												duration: 2000
											});
										})
								})
							// ^视频显示
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				});
			},
			startLightBackTime(){
				setTimeout(()=>{
					if(this.light_number >0){
						this.light_number --
						this.startLightBackTime()
					}else{
						this.show_light = false
						return
					}
				},1000)
			},
			postTaskVideo(){
				let _self = this
				uni.request({
					url: util.getUrl("task/reward_ad"),
					header: {
						'content-type': 'application/x-www-form-urlencoded',
						'Authori-zation':uni.getStorageSync("token")
					},
					data:{
						task_id:_self.task_id
					},
					method: 'POST',
					success: res => {
						if(res.data.code == 1){
							uni.showToast({
								title:'观看成功!',
								icon:'success'
							})
							_self.isclickcardad = false
							_self.clickcardad = false
							_self.redmoneyType = 0
							_self.updateloadtaskIndex()
						}else if(res.data.code == 500){
							_self.is_login = true
							_self.nextLogin()
						}else{
							_self.is_login = false
							uni.showToast({
								title:res.data.msg,
								icon:'none'
							})
						}
					},
				});
			},
			updateloadtaskIndex(){
				for(let key in this.cdTaskList){
					clearInterval(this.cdTaskList[key])
				}
				let _self = this
				uni.request({
					url: util.getUrl("task/index"),
					header: {
						'content-type': 'application/x-www-form-urlencoded',
						'Authori-zation':uni.getStorageSync("token")
					},
					data:{
					},
					method: 'POST',
					success: res => {
						if(res.data.code == 1){
							_self.taskList = res.data.data.list
							for(let key in _self.taskList){
								if(_self.taskList[key].cd_second >0){
									_self.taskCd_second(key)
								}
							}
						}else if(res.data.code == 500){
							uni.showToast({
								title:res.data.msg,
								icon:'none'
							})
							uni.navigateTo({
								url:'../../pages/login/login'
							})
						}
					},
				});
			},
			showdhhb(){
				this.dhhbaInterVal = setInterval(()=>{
					
				},8000) 
			},
			lotteryaddress(){
				this.lotteryorgift = 1
				this.selectAddressFunction()
			},
			closeAddress(){
				this.$refs.selectaddress.close()
			},
			closesaveaddress(){
				this.$refs.addaddress.close()
				this.selectAddressFunction()
			},
			switchChange(res){
				this.isDefault = res.detail.value?1:0
			},
			getTaskList(){
				let _self = this
				uni.request({
					url: util.getUrl("task/index"),
					header: {
						'content-type': 'application/x-www-form-urlencoded',
						'Authori-zation':uni.getStorageSync("token")
					},
					data:{
						type:'game_coin',
					},
					method: 'POST',
					success: res => {
						if(res.data.code == 1){
							_self.taskList = res.data.data.list
							for(let key in _self.taskList){
								if(_self.taskList[key].cd_second>0){
									_self.taskCd_second(key)
								}
							}
						}
					},
				});
			},
			selectAddressFunction(){
				let _self = this
				uni.request({
					url: util.getUrl("address/index"),
					header: {
						'content-type': 'application/x-www-form-urlencoded',
						'Authori-zation':uni.getStorageSync("token")
					},
					data:{
					},
					method: 'POST',
					success: res => {
						if(res.data.code == 1){
							_self.addressList = res.data.data.list
							console.log(_self.addressList)
							_self.$refs.successLuckdraw.close()
							_self.$refs.selectaddress.open()
						}
					},
				});
			},
			postExchangeClose(){
				this.$refs.successLuckdraw.close()
			},
			addressnew(){
				let _self = this
				_self.username=""
				_self.mobile=""
				_self.province='请选择地址'
				_self.city=''
				_self.district=''
				_self.address=''
				_self.$refs.selectaddress.close()
				_self.$refs.addaddress.open()
			},
			addressChange(item){
				this.is_changeorAdd = 1
				this.addressitem = item
				this.username = this.addressitem.username
				this.mobile = this.addressitem.mobile
				this.province = this.addressitem.province
				this.city = this.addressitem.city
				this.district = this.addressitem.district
				this.address = this.addressitem.address
				this.$refs.selectaddress.close()
				this.$refs.addaddress.open()
			},
			setAddressDefault(item){
				let _self = this
				uni.request({
					url: util.getUrl("address/save"),
					header: {
						'content-type': 'application/x-www-form-urlencoded',
						'Authori-zation':uni.getStorageSync("token")
					},
					data:{
						username:item.username,
						mobile:item.mobile,
						province:item.province,
						city:item.city,
						district:item.district,
						address:item.address,
						is_default:1,
						address_id:item.id
					},
					method: 'POST',
					success: res => {
						if(res.data.code == 1){
							this.selectAddressFunction()
						}
					},
				});
			},
			deleteAddress(id){
				console.log("asdf222222222222222222222")
				let _self = this
				uni.request({
					url: util.getUrl("address/delete"),
					header: {
						'content-type': 'application/x-www-form-urlencoded',
						'Authori-zation':uni.getStorageSync("token")
					},
					data:{
						address_id:id
					},
					method: 'POST',
					success: res => {
						if(res.data.code == 1){
							uni.showToast({
								title:'删除成功！',
								icon:'none'
							})
							_self.updateaddresslist()
						}
					},
				});
			},
			updateaddresslist(){
				console.log("asdf11111111111111111111111111111")
				let _self = this
				uni.request({
					url: util.getUrl("address/index"),
					header: {
						'content-type': 'application/x-www-form-urlencoded',
						'Authori-zation':uni.getStorageSync("token")
					},
					data:{
					},
					method: 'POST',
					success: res => {
						if(res.data.code == 1){
							_self.addressList = res.data.data.list
							_self.$refs.addaddress.close()
							_self.$refs.selectaddress.open()
						}
					},
				});
			},
			saveaddresspopup(){
				let _self = this
				if(_self.username !="" && _self.mobile !="" && _self.province !="" && _self.city !="" && _self.address !=""){
					if(_self.mobile.length == 11){
						uni.request({
							url: util.getUrl("address/save"),
							header: {
								'content-type': 'application/x-www-form-urlencoded',
								'Authori-zation':uni.getStorageSync("token")
							},
							data:{
								username:_self.username,
								mobile:_self.mobile,
								province:_self.province,
								city:_self.city,
								district:_self.district,
								address:_self.address,
								is_default:_self.isDefault?1:0,
								address_id:_self.addressitem.id
							},
							method: 'POST',
							success: res => {
								if(res.data.code == 1){
									uni.showToast({
										title:'保存成功！',
										icon:'none'
									})
									_self.username=""
									_self.mobile=""
									_self.province=''
									_self.city=''
									_self.district=''
									_self.address=''
									this.$refs.addaddress.close()
									this.selectAddressFunction()
								}else{
									uni.showToast({
										title:res.data.msg,
										icon:'none'
									})
									console.log(res.data.msg)
								}
							},
						});
					}else{
						uni.showToast({
							title:'请输入正确的联系电话！',
							icon:'none'
						})
					}
				}else{
					uni.showToast({
						title:'请填写完整的信息!',
						icon:'none'
					})
				}
			},
			enterPostExchange(id){
				let _self = this
				if(_self.lotteryorgift == 1){
					_self.lotterenteraddress(id)
				}else if(_self.lotteryorgift == 2){
					_self.giftenteraddress(id)
				}
			},
			giftenteraddress(id){
				let _self = this
				uni.showModal({
					title:"是否领取？",
					success(res) {
						if(res.confirm){
							uni.request({
								url: util.getUrl("red_packet/express"),
								header: {
									'content-type': 'application/x-www-form-urlencoded',
									'Authori-zation':uni.getStorageSync("token")
								},
								data:{
									order_id:_self.giftOpenInfo.order_id,
									address_id:id
								},
								method: 'POST',
								success: res => {
									if(res.data.code == 1){
										uni.showToast({
											title:'领取成功!',
											icon:'success'
										})
										_self.$refs.selectaddress.close()
										_self.$refs.successgift.close()
									}else{
										_self.$refs.selectaddress.close()
										_self.$refs.successgift.close()
										uni.showToast({
											title:res.data.msg,
											icon:'none'
										})
									}
								},
							});
						}
					}
				})
			},
			lotterenteraddress(id){
				let _self = this
				uni.showModal({
					title:"是否领取？",
					success(res) {
						if(res.confirm){
							uni.request({
								url: util.getUrl("lottery/express"),
								header: {
									'content-type': 'application/x-www-form-urlencoded',
									'Authori-zation':uni.getStorageSync("token")
								},
								data:{
									order_id:_self.lotteryinfo.order_id,
									address_id:id
								},
								method: 'POST',
								success: res => {
									if(res.data.code == 1){
										uni.showToast({
											title:'领取成功!',
											icon:'success'
										})
										_self.$refs.selectaddress.close()
										_self.$refs.lotterygoods.open()
									}else{
										_self.$refs.selectaddress.close()
										_self.$refs.lotterygoods.open()
										uni.showToast({
											title:res.data.msg,
											icon:'none'
										})
									}
								},
							});
						}
					}
				})
			},
			isSynthesisover(data){
				console.log(data)
				if(data){
					this.updatecardList()
				}
			},
			setusername(res){
				this.username = res.detail.value
				console.log(this.username)
			},
			setmobile(res){
				this.mobile = res.detail.value
				console.log(this.mobile)
			},
			setaddress(res){
				this.address = res.detail.value
				console.log(this.address)
			},
			goToLogin(is_login){
				console.log(is_login)
				if(is_login){
					uni.navigateTo({
						url:'../../pages/login/login'
					})
				}
			},
			setcolorConfig(){
				this.synthesisImg = uni.getStorageSync("diyImg")
				this.pubilcPopupImg = uni.getStorageSync("diyImg")
				this.publicTextColor = uni.getStorageSync("diyColor")
				this.syncolor = uni.getStorageSync("diyColor")
				this.appConfig = uni.getStorageSync("appconfig")
				this.menu = uni.getStorageSync("menu")
			},
			showIndexInfo(){
				let _self = this
				uni.request({
					url: util.getUrl("index/index"),
					header: {
						'content-type': 'application/x-www-form-urlencoded',
						'Authori-zation':uni.getStorageSync("token")
					},
					data:{
					},
					method: 'POST',
					success: res => {
						if(res.data.code == 1){
							_self.resData = res.data.data
							for(let i in res.data.data.member_card_alert){
								res.data.data.member_card_alert[i].card_name = Math.ceil(Math.random()*355)+'rpx'
								res.data.data.member_card_alert[i].member_id = false
							}
							
							let synthesis = {
								member_card_alert:res.data.data.member_card_alert,
								member_card_combine_alert:res.data.data.member_card_combine_alert,
								user_name:uni.getStorageSync("userName"),
								avatar:uni.getStorageSync("avatar"),
								card_combine_daily_times:res.data.data.card_combine_daily_times,
								member_combine_times:res.data.data.member_combine_times,
								card_combine_rewarded_amount:res.data.data.card_combine_rewarded_amount,
								card_combine_rewarded_type:res.data.data.card_combine_rewarded_type,
								question_cost_amount:res.data.data.question_cost_amount,
								question_cost_type:res.data.data.question_cost_type,
								member_money:res.data.data.member_money,
								member_gold_coin:res.data.data.member_gold_coin,
								member_game_coin:res.data.data.member_game_coin,
								member_exp:res.data.data.member_exp,
								level_percent_format:res.data.data.level_percent_format,
								level : res.data.data.level,
								level_image: res.data.data.level_image
							}
							_self.rewarded_ad_unit_light = res.data.data.rewarded_ad_unit
							_self.indextaskimageList = res.data.data.task_list
							_self.is_to_combined = res.data.data.is_to_combined
							_self.synthesisData = synthesis
							_self.clearance = res.data.data.question_section
							_self.level_reward = res.data.data.level_reward
							_self.expNumber = res.data.data.level_percent_format
							if(res.data.data.level_reward.is_reward_money){
								_self.is_reward_money = res.data.data.level_reward.is_reward_money
							}
							if(res.data.data.level_reward !=""){
								setTimeout(()=>{
									if(res.data.data.level_reward.is_reward == 1){
										_self.$refs.lvpopup.open()
									}else if(res.data.data.level_reward.is_reward_money == 1){
										_self.$refs.lvmoneypopup.open()
									}
								},1000)
							}
							let timesInterval = _self.synthesisData.member_card_alert.length*800 + 15000
							console.log("timesInterval,timesInterval,timesInterval",timesInterval)
							setTimeout(()=>{
								_self.showBulletChat()
							},3500)
							_self.card_alart_interval = setInterval(()=>{
								_self.showBulletChat()
							},timesInterval)
							if(res.data.data.card_list[0].member_card){
								for(let key in res.data.data.card_list){
									_self.cardlist[key].member_card = res.data.data.card_list[key].member_card
									console.log(_self.cardlist[key].member_card)
								}
							}
						}
					},
				});
			},
			showBulletChat(){
				let _self = this	
				let card_key = 0
				let setI = setInterval(()=>{
					card_key++
					if(_self.synthesisData.member_card_alert[card_key]){
						_self.synthesisData.member_card_alert[card_key].member_id = !_self.synthesisData.member_card_alert[card_key].member_id
					}else{
						clearInterval(setI)
					}
				},800)
			},
			updateCustomsreward(){
				let _self = this
				uni.request({
					url: util.getUrl("index/index"),
					header: {
						'content-type': 'application/x-www-form-urlencoded',
						'Authori-zation':uni.getStorageSync("token")
					},
					data:{
					},
					method: 'POST',
					success: res => {
						if(res.data.code == 1){
							_self.clearance = res.data.data.question_section
						}
					},
				});
			},
			updatecardList(){ 
				// 
				let _self = this
				uni.request({
					url: util.getUrl("index/index"),
					header: {
						'content-type': 'application/x-www-form-urlencoded',
						'Authori-zation':uni.getStorageSync("token")
					},
					data:{
					},
					method: 'POST',
					success: res => {
						_self.is_to_combined = res.data.data.is_to_combined
						if(res.data.code == 1){
							for(let i in res.data.data.member_card_alert){
								res.data.data.member_card_alert[i].card_name = Math.ceil(Math.random()*355)+'rpx'
								res.data.data.member_card_alert[i].member_id = false
							}
							console.log("res.data.data.member_card_alert",res.data.data.member_card_alert)
							_self.synthesisData = res.data.data
							for(let key in res.data.data.card_list){
								this.cardlist[key].member_card = res.data.data.card_list[key].member_card
							}
						}
					},
				});
			},
			getIndexInfo(){
				let _self = this
				let token = uni.getStorageSync("token")
				uni.request({
					url: util.getUrl("index/index"),
					header: {
						'content-type': 'application/x-www-form-urlencoded',
					},
					data:{
					},
					method: 'POST',
					success: res => {
						let numberimage = 0
						let numbericon = 0
						_self.cardlist = uni.getStorageSync("synCardList")
						setTimeout(()=>{
							for(let key in _self.resData.card_list){
								_self.cardlist[key].member_card = _self.resData.card_list[key].member_card
							}
						},1000)
						uni.setStorageSync("synCardList",res.data.data.card_list)
						_self.cardlist = uni.getStorageSync("synCardList")
					}
				});
			},
			goToexchange(data){
				if(data.go){
					uni.navigateTo({
						url:'exchangeShop'
					})
				}
			},
			lotteryjoinList(){
				
			},
			onestartstartlottery(){
				this.clickoneluttery++
				if(this.clickoneluttery == 1){
					if(this.member_daily_free_count >0){
						this.startlottery()
					}else{
						this.clickoneluttery = 0
						this.$refs.lotterygoods.close()
						this.$refs.luckDrawfail.open()
					}
				}else{
					uni.showToast({
						title:'抽奖中...',
						icon:'none'
					})
				}
				
			},
			twoStartlottery(){
				this.$refs.luckDrawfail.close()
				this.$refs.lotterygoods.open()
				this.startlottery()
			},
			startlottery(){
				let _self = this
				uni.request({
					url: util.getUrl("lottery/good_luck"),
					header: {
						'content-type': 'application/x-www-form-urlencoded',
						"Authori-zation":uni.getStorageSync("token")
					},
					data:{
					},
					method: 'POST',
					success: res => {
						if(res.data.code == 1){
							_self.lotteryinfo = res.data.data.good_luck
							let lotteryida  = -1
							let i=0
							for(i;i<_self.lotteryList.length;i++){
								if(_self.lotteryList[i].id == _self.lotteryinfo.id){
									break;
									lotteryida = i
									console.log(lotteryida)
								}
							}
							console.log(i)
							var lun = 24;
							var daojishi = setInterval(() => {
								if (lun > 0) {
									if (_self.lotteryId < 11) {
										_self.lotteryId++;
									} else {
										_self.lotteryId = 0;
									}
									lun--;
								} else {
									clearInterval(daojishi);
									var daojishi2 = setInterval(() => {
										if (_self.lotteryId == i) {
											clearInterval(daojishi2);
											if(_self.lotteryinfo.reward_type == 0){
												_self.$refs.failLuckdraw.open()
											}else{
												_self.clickoneluttery = 0
												_self.$refs.successLuckdraw.open()
											}
											_self.$refs.lotterygoods.close()
											_self.updatelottery()
										} else {
											if (_self.lotteryId < 11) {
												_self.lotteryId++;
											} else {
												_self.lotteryId = 0;
											}
										}
									}, 400)
								}
							}, 100)
							this.setLotteryNumber()
						}else{
							uni.showToast({
								title:res.data.msg,
								icon:'none'
							})
						}
					}
				});
			},
			setLotteryNumber(){
				this.lottery_number = uni.getStorageSync("lottery_number")
				console.log(this.lottery_number)
				this.lottery_number++
				uni.setStorageSync("lottery_number",this.lottery_number)
			},
			closelotterySuccess(){
				this.$refs.successLuckdraw.close()
				this.$refs.lotterygoods.open()
			},
			closesuccesschange(){
				this.$refs.lotterygoods.open()
			},
			closeluckDrawrule(){
				this.clickoneluttery = 0
				this.$refs.failLuckdraw.close()
				this.$refs.lotterygoods.open()
			},
			closeluckDrawrule1(){
				this.$refs.luckDrawrule.close()
				this.$refs.lotterygoods.open()
			},
			closedrawRecord(){
				this.$refs.lotterygoods.open()
				this.$refs.lottery_Record.close()
			},
			opendrawRecord(opentype){
				let _self = this
				uni.request({
					url: util.getUrl("lottery/order"),
					header: {
						'content-type': 'application/x-www-form-urlencoded',
						'Authori-zation':uni.getStorageSync("token")
					},
					data:{
						page:_self.lotterypage,
						size:10,
						status:_self.recordchangeid,
					},
					method: 'POST',
					success: res => {
						if(res.data.code == 1){
							if(_self.lotterypage == 1 ){
								if(res.data.data.list.length>0){
									_self.lotteryGoinList = res.data.data.list
								}else{
									uni.showToast({
										title:'暂无更多信息',
										icon:'none'
									})
								}
							}else if(res.data.data.list.length<=0){
								_self.lotterypage --
								uni.showToast({
									title:'暂无更多信息',
									icon:'none'
								})
							}else{
								for(let key in res.data.data.list){
									_self.lotteryGoinList.push(res.data.data.list[key])
								}
							}
						}
						if(opentype == 1){
							this.$refs.lotterygoods.close()
							this.$refs.lottery_Record.open()
						}
					}
				});
			},
			loadlotteryjoinmore(){
				this.lotterypage ++
				this.opendrawRecord(2)
			},
			opendrawrule(){
				this.$refs.luckDrawrule.open()
				this.$refs.lotterygoods.close()
			},
			changerecord(id){
				this.lotterypage =1
				this.lotteryGoinList = []
				this.recordchangeid = id
				this.opendrawRecord(2)
			},
			showLuckDraw(data){
				let _self = this
				uni.request({
					url: util.getUrl("lottery/index"),
					header: {
						'content-type': 'application/x-www-form-urlencoded',
						'Authori-zation':uni.getStorageSync("token")
					},
					data:{
					},
					method: 'POST',
					success: res => {
						if(res.data.code == 1){
							_self.lotteryList = res.data.data.list
							_self.cost_type = res.data.data.cost_type
							_self.cost_amount = res.data.data.cost_amount
							_self.daily_free_times = res.data.data.daily_free_times
							_self.member_daily_count = res.data.data.member_daily_count
							_self.member_daily_free_count = res.data.data.member_daily_free_count
							_self.rewarded_ad_unit = res.data.data.rewarded_ad_unit
							_self.desc = res.data.data.desc	
						}
						if(data.show){
							_self.$refs.lotterygoods.open()
						}
					}
				});
			},
			updatelottery(){
				let _self = this
				uni.request({
					url: util.getUrl("lottery/index"),
					header: {
						'content-type': 'application/x-www-form-urlencoded',
						'Authori-zation':uni.getStorageSync("token")
					},
					data:{
					},
					method: 'POST',
					success: res => {
						if(res.data.code == 1){
							_self.lotteryList = res.data.data.list
							_self.cost_type = res.data.data.cost_type
							_self.cost_amount = res.data.data.cost_amount
							_self.daily_free_times = res.data.data.daily_free_times
							_self.member_daily_count = res.data.data.member_daily_count
							_self.member_daily_free_count = res.data.data.member_daily_free_count
							_self.rewarded_ad_unit = res.data.data.rewarded_ad_unit
							_self.desc = res.data.data.desc	
						}
					}
				});
			},
			giftopenaddress(){
				if(this.giftOpenInfo.type == 2){
					this.lotteryorgift = 2
					this.selectAddressFunction()
				}else{
					this.$refs.successgift.close()
				}
			},
			beforeGetGiftGoods(){
				if(this.indexRedMoney.member_daily_free_count>0){
					this.redmoneyType = 4
					console.log(this.indexRedMoney.rewarded_ad_unit)
					this.lookAdVideo(this.indexRedMoney.rewarded_ad_unit,4)
				}else{
					console.log(this.indexRedMoney)
					this.$refs.giftpopup.close()
					this.$refs.exchangegift.open()
				}
			},
			twoexchangegift(){
				this.$refs.exchangegift.close()
				this.redmoneyType = 4
				this.lookAdVideo(this.indexRedMoney.rewarded_ad_unit,4)
			},
			getGiftGoods(){
				let _self = this
				uni.request({
					url: util.getUrl("red_packet/good_luck"),
					header: {
						'content-type': 'application/x-www-form-urlencoded',
						'Authori-zation':uni.getStorageSync("token")
					},
					data:{
					},
					method: 'POST',
					success: res => {
						if(res.data.code == 1){
							_self.giftOpenInfo = res.data.data.good_luck
							_self.closegiftpopup()
							_self.$refs.successgift.open()
							_self.red_packetIndex()
							_self.updatecardList()
						}else{
							uni.showToast({
								title:res.data.msg,
								icon:'none'
							})
						}
					}
				});
			},
			setusername(res){
				this.username = res.detail.value
			},
			setmobile(res){
				this.mobile = res.detail.value
			},
			setaddress(res){
				this.address = res.detail.value
			},
			closegiftpopup(){
				this.$refs.giftpopup.close()
			},
			clickgift(){
				this.$refs.giftpopup.open()
				console.log(this.indexRedMoney)
			},
			goToTab(url,url_name){
				console.log(url)
				if(url_name == "首页"){
					
				}else if(url_name == "任务"){
					uni.reLaunch({
						url:'../../pages/task/index'
					})
				}else if(url_name == '我的'){
					uni.reLaunch({
						url:'../../pages/my/index',
						fail(e) {
							console.log(e)
						},
					})
				}
			}
		}
	}
</script>

<style lang="scss">
	
	.sharebtn{
		position: absolute;
		height: 86rpx;
		width: 86rpx;
		border-radius: 50%;
		z-index: 99;
		background-color: rgba(0,0,0,0);
		background: rgba(0,0,0,0);
		&::after{
			border: none;
			background: none;
		}
		.imageshare{
			width: 100%;
			height: 100%;
			position: absolute;
			left: 0;
			top: 0;
		}
	}
	.taskindeximage{
		position: absolute;
		height: 86rpx;
		width: 86rpx;
		z-index: 88;
	}
	.image10{
		top: 28%;
		left: 50rpx;
		animation: taskindeximage 1s infinite alternate;
	}
	.image11{
		top: 65%;
		left: 50rpx;
		animation: taskindeximage 1.3s infinite alternate;
	}
	.image12{
		top: 65%;
		rigth: 50rpx;
		animation: taskindeximage 1.6s infinite alternate;
	}
	@keyframes taskindeximage{
		0%{
			transform: translateY(20rpx);
		}
		100%{
			transform: translateY(-20rpx);
		}
	}
	.showcardclass{
		display: flex;
		align-items: center;
		flex-direction: column;
		width: 690rpx;
		position: relative;
		.closeimage{
			height: 60rpx;
			width: 60rpx;
			top: -80rpx;
			right: 0;
			position: absolute;
		}
		.cardinfo{
			background: #FFFFFF;
			border-radius: 20rpx;
			box-sizing: border-box;
			margin-bottom: 30rpx;
			margin-top: 21rpx;
			.text1{
				margin: 22rpx 51rpx;
			}
			.adimage{
				width: 680rpx;
				height: 258rpx;
			}
		}
	}
	.getScrollpopup{
		display: flex;
		align-items: center;
		flex-direction: column;
		padding-bottom: 35rpx;
		border-radius: 15rpx;
		position: relative;
		.itemindex{
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin: 0 25rpx 0 27rpx;
			width: 630rpx;
			box-sizing: border-box;
			padding: 26rpx 0;
			.btn{
				display: flex;
				align-items: center;
				justify-content: center;
				width: 139rpx;
				height: 56rpx;
				position: relative;
			}
			.iteminfo{
				display: flex;
				align-items: center;
				.itemtext{
					display: flex;
					flex-direction: column;
					.text1{
						margin-bottom: 19rpx;
					}
				}
				image{
					width: 100rpx;
					height: 100rpx;
					margin-right: 25rpx;
				}
			}
		}
		.exchagetop{
			position: relative;
			width: 690rpx;
			display: flex;
			justify-content: center;
			border-radius: 15rpx 15rpx 0 0;
			margin-bottom: 11rpx;
			padding: 23rpx 0 25rpx 0;
			box-sizing: border-box;
			.closepopup{
				position: absolute;
				right: 30rpx;
				top:30rpx;
				height: 31rpx;
				width: 31rpx;
			}
		}
	}
	.addaddresspopup{
		display: flex;
		flex-direction: column;
		align-items: center;
		width: 750rpx;
		box-sizing: border-box;
		padding: 29rpx 30rpx 160rpx 30rpx;
		position: relative;
		.btn{
			display: flex;
			align-items: center;
			justify-content: center;
			width: 419rpx;
			height: 80rpx;
			position: relative;
			margin-top: 70rpx;
		}
		.addressitemdefault{
			display: flex;
			border-radius: 8rpx;
			width: 690rpx;
			height: 86rpx;
			box-sizing: border-box;
			padding: 29rpx 26rpx;
			margin-bottom: 30rpx;
			align-items: center;
			justify-content: space-between;
			.textname{
				width: 139rpx;
			}
		}
		.addressitem{
			display: flex;
			border-radius: 8rpx;
			width: 690rpx;
			height: 86rpx;
			box-sizing: border-box;
			padding: 29rpx 26rpx;
			margin-bottom: 30rpx;
			align-items: center;
			.textname{
				width: 139rpx;
			}
			.inputclass{
				width: 479rpx;
			}
		}
		.closepopup{
			position: absolute;
			right: 30rpx;
			top: 34rpx;
		}
	}
	.addresspopup{
		display: flex;
		flex-direction: column;
		align-items: center;
		width: 750rpx;
		box-sizing: border-box;
		padding: 29rpx 30rpx 160rpx 30rpx;
		position: relative;
		.btn{
			display: flex;
			align-items: center;
			justify-content: center;
			width: 419rpx;
			height: 80rpx;
			position: relative;
			margin-top: 30rpx;
		}
		.addressitem{
			display: flex;
			flex-direction: column;
			border-radius: 8rpx;
			width: 690rpx;
			box-sizing: border-box;
			padding: 30rpx 0rpx 16rpx 0rpx;
			margin-bottom: 30rpx;
			.textname{
				margin-bottom: 16rpx;
				box-sizing: border-box;
				padding-left: 26rpx;
			}
			.textaddress{
				box-sizing: border-box;
				padding-bottom: 30rpx;
				box-sizing: border-box;
				padding-left: 26rpx;
			}
			.btnindex{
				display: flex;
				width: 100%;
				align-items: center;
				box-sizing: border-box;
				padding-top: 16rpx;
				justify-content: space-between;
				padding: 16rpx 26rpx 0 26rpx;
				
				.changeaddress{
					display: flex;
					align-items: center;
					.image1{
						display: flex;
						align-items: center;
						image{
							width: 30rpx;
							height: 30rpx;
							margin-right: 10rpx;
						}
					}
				}
				.defaultaddress{
					display: flex;
					align-items: center;
					image{
						width: 38rpx;
						height: 38rpx;
						margin-right: 16rpx;
					}
				}
			}
		}
		.closepopup{
			position: absolute;
			right: 30rpx;
			top: 34rpx;
		}
	}
	.lotterygoods{
		display: flex;
		flex-direction: column;
		align-items: center;
		position: relative;
		width: 690rpx;
		padding: 65rpx 45rpx 26rpx 60rpx;
		border-radius: 20rpx;
		box-sizing: border-box;
		.bottomtext{
			display: flex;
			width: 100%;
			align-items: center;
			padding: 25rpx 58rpx 0 61rpx;
			justify-content: space-between;
			.text1{
				text-decoration: underline;
			}
		}
		.goodsindex{
			width: 100%;
			position: relative;
			flex-wrap: wrap;
			display: flex;
			.item4{
				display: flex;
				position: relative;
				align-items: center;
				justify-content: center;
				width: 189rpx;
				height: 188rpx;
				flex-direction: column;
				margin-left: -5rpx;
				margin-right: 9rpx;
				text{
					z-index: 1;
				}
			}
			.item3{
				width: 167rpx;
				margin-right: 21rpx;
				margin-left: 5rpx;
				line-height: 28rpx;
			}
			.item2{
				display: flex;
				flex-direction: column;
				align-items: center;
				margin-bottom: 42rpx;
				width: 165rpx;
				margin-right: 21rpx;
				margin-left: 9rpx;
				box-sizing: border-box;
				padding-top: 25rpx;
				image{
					height: 91rpx;
					width: 87rpx;
					margin-bottom: 31rpx;
				}
			}
			.item1{
				display: flex;
				align-items: center;
				justify-content: center;
				flex-direction: column;
				height: 180rpx;
				width: 180rpx;
				border-radius: 20rpx;
				margin-right: 15rpx;
				margin-bottom: 15rpx;
				.itemimg{
					width: 75rpx;
					height: 75rpx;
					margin-bottom: 11rpx;
				}
			}
		}
		.closepopup{
			position: absolute;
			right: 20rpx;
			top: 17rpx;
			width: 31rpx;
			height: 31rpx;
		}
	}
	.record{
		display: flex;
		width: 690rpx;
		flex-direction: column;
		align-items: center;
		position: relative;
		box-sizing: border-box;
		padding: 30rpx 0;
		border-radius: 20rpx;
		.listrecord{
			width: 100%;
			box-sizing: border-box;
			display: flex;
			flex-direction: column;
			padding: 0 30rpx;
			.item{
				display: flex;
				justify-content: space-between;
				align-items: center;
				width: 100%;
				box-sizing: border-box;
				padding: 30rpx 0;
				.infotext{
					display: flex;
					flex-direction: column;
					justify-content: center;
				}
			}
		}
		.titlechange{
			width: 630rpx;
			height: 80rpx;
			display: flex;
			align-items: center;
			justify-content: space-around;
			border-radius: 12rpx;
		}
		.recordtitle{
			box-sizing: border-box;
			padding-bottom: 30rpx;
			width: 100%;
			text-align: center;
			margin-bottom: 30rpx;
		}
		.closepopup{
			position: absolute;
			right: 30rpx;
			top: 30rpx;
			width: 31rpx;
			height: 31rpx;
		}
	}
	.exchagepopup{
		display: flex;
		align-items: center;
		flex-direction: column;
		padding-bottom: 40rpx;
		border-radius: 15rpx;
		position: relative;
		.lvgoods{
			width: 690rpx;
			box-sizing: border-box;
			padding: 0 30rpx;
			display: flex;
			align-items: center;
			justify-content: space-around;
			.moneyred{
				display: flex;
				justify-content: center;
				width: 241rpx;
				height: 245rpx;
				position: relative;
				image{
					width: 100%;
					height: 100%;
					position: absolute;
					top: 0;
					left: 0;
				}
			}
			.goodsitem{
				display: flex;
				align-items: center;
				flex-direction: column;
				margin-bottom: 30rpx;
				.goodsimagelv{
					width: 103rpx;
					height: 103rpx;
					margin-bottom: 25rpx;
				}
			}
		}
		.doublelv{
			width: 459rpx;
			height: 88rpx;
			position: relative;
			display: flex;
			align-items: center;
			justify-content: center;
			margin-bottom: 45rpx;
			margin-top: 34rpx;
			.videoclass{
				width: 45rpx;
				height: 38rpx;
				z-index: 1;
				margin-right: 19rpx;
			}
		}
		.text1{
			text-align: center;
			margin-top: -30rpx;
		}
		.btn{
			display: flex;
			align-items: center;
			justify-content: center;
			width: 410rpx;
			height: 80rpx;
			position: relative;
			margin-top: 36rpx;
			.videoicon{
				width: 48rpx;
				height: 34rpx;
				margin-right: 20rpx;
				z-index: 1;
			}
		}
		.centerimagefail{
			width: 202rpx;
			height: 202rpx;
			position: relative;
			margin-bottom: 80rpx;
			margin-top: 80rpx;
		}
		.centerimage{
			width: 437rpx;
			height: 345rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			margin-bottom: 18rpx;
			position: relative;
			
			.exchangegoodsimage{
				width: 219rpx;
				height: 207rpx;
				z-index: 1;
			}
		}
		.exchagetop{
			position: relative;
			width: 690rpx;
			height: 105rpx;
			display: flex;
			justify-content: center;
			border-radius: 15rpx 15rpx 0 0;
			.closepopup{
				position: absolute;
				right: 30rpx;
				top:30rpx;
				height: 41rpx;
				width: 43rpx;
			}
			.imagetop{
				position: absolute;
				top: 0;
				z-index: 0;
				height: 92rpx;
				width: 445rpx;
			}
		}
	}
	.loadexchagepopup{
		display: flex;
		align-items: center;
		flex-direction: column;
		padding-bottom: 40rpx;
		border-radius: 15rpx;
		position: relative;
		width: 690rpx;
		.textrule{
			box-sizing: border-box;
			padding: 3rpx 56rpx 46rpx 51rpx;
			height: 500rpx;
		}
		.text1{
			text-align: center;
			line-height:45rpx;
		}
		.btnlist{
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin-top: 45rpx;
			.btn{
				display: flex;
				align-items: center;
				justify-content: center;
				width: 200rpx;
				height: 60rpx;
				position: relative;
			}
		}
		.centerimage{
			width: 265rpx;
			height: 247rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			margin-bottom: 43rpx;
			position: relative;
			.exchangegoodsimage{
				width: 127rpx;
				height: 169rpx;
				background-color: #FFFFFF;
				z-index: 1;
			}
		}
		.exchagetop{
			position: relative;
			width: 690rpx;
			height: 80rpx;
			display: flex;
			justify-content: center;
			border-radius: 15rpx 15rpx 0 0;
			margin-bottom: 43rpx;
			.closepopup{
				position: absolute;
				right: 30rpx;
				top:30rpx;
				height: 31rpx;
				width: 31rpx;
			}
			.imagetop{
				position: absolute;
				top: 0;
				z-index: 0;
				height: 92rpx;
				width: 445rpx;
			}
		}
	}
	.successsynpopup1{
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;
		.successbtn{
			display: flex;
			align-items: center;
			justify-content: center;
			width: 419rpx;
			height: 88rpx;
			position: relative;
		}
		.successcenter{
			display: flex;
			align-items: center;
			justify-content: center;
			width: 481rpx;
			position: relative;
			flex-direction: column;
			.successtext{
				width: 249rpx;
				text-align: center;
				margin-bottom: 59rpx;
				margin-top: -75rpx;
				line-height: 56rpx;
			}
			.goodsimg{
				position: relative;
				width: 386rpx;
				height: 388rpx;
				display: flex;
				align-items: center;
				justify-content: center;
			}
			.successgoods{
				position: relative;
				width: 211rpx;
				height: 172rpx;
				
			}
			.bgimg{
				position: absolute;
				width: 100%;
				height: 100%;
				top: 0;
				left: 0;
				z-index: -1;
			}
		}
		.successtop{
			width: 415rpx;
			height: 131rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			position: relative;
		}
	}
	.successsynpopup{
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;
		.text1{
			width: 320rpx;
			line-height: 50rpx;
			margin-top: -98rpx;
			margin-bottom: 51rpx;
			text-align: center;
		}
		.successbtn{
			display: flex;
			align-items: center;
			justify-content: center;
			width: 419rpx;
			height: 88rpx;
			position: relative;
		}
		.successcenter{
			display: flex;
			align-items: center;
			justify-content: center;
			width: 481rpx;
			height: 481rpx;
			position: relative;
			.successgoods{
				position: relative;
				width: 211rpx;
				height: 211rpx;
				.goodsNumber{
					-webkit-text-stroke: 5rpx #8B3703;
					text-stroke: 5rpx #8B3703;
					position: absolute;
					bottom: 0;
					right: 36rpx;
				}
			}
			.bgimg{
				position: absolute;
				width: 100%;
				height: 100%;
				top: 0;
				left: 0;
				z-index: -1;
			}
		}
		.successtop{
			width: 415rpx;
			height: 131rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			position: relative;
		}
	}
	.giftpopupclass{
		position: relative;
		width: 642rpx;
		height: 628rpx;
		display: flex;
		align-items: center;
		flex-direction: column;
		.text1{
			margin-top: 51rpx;
			margin-bottom: 30rpx;
		}
		.closegiftpopup{
			position: absolute;
			bottom: -70rpx;
			height: 62rpx;
			width: 62rpx;
		}
	}
	.gifclass{
		width: 102rpx;
		height: 108rpx;
		position: fixed;
		left: 300rpx;
		top: 300rpx;
		z-index: 5;
		animation: gifanm 30s;
	}
	@keyframes gifanm{
		from{
			top: 300rpx;
		}to{
			top:2000rpx;
		}
	}
	.indexSynthesis{
		position: relative;
		.draw{
			display: flex;
			align-items: center;
			flex-direction: column;
			position: absolute;
			bottom: 80rpx;
			left: 39rpx;
			.drawsindex{
				width: 101rpx;
				height: 101rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				background-size: 100% 100%;
				margin-bottom: 12rpx;
				image{
					width: 100%;
					height: 100%;
				}
			}
		}
		.luck{
			display: flex;
			align-items: center;
			flex-direction: column;
			position: absolute;
			bottom: 85rpx;
			right: 39rpx;
			image{
				width: 100%;
				height: 100%;
			}
			.drawsindex{
				width: 90rpx;
				height: 90rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				background-size: 100% 100%;
				margin-bottom: 12rpx;
			}
		}
	}
	.content{
		min-height: 50vh;
		width: 750rpx;
		display: flex;
		flex-direction: column;
		overflow: hidden;
	}
	.topTitle{
		color: #FFFFFF;
		display: flex;
		align-items: center;
		height: 67rpx;
		padding-left: 30rpx;
		justify-content: center;
		position: absolute;
		z-index: 10;
		width: 100%;
	}
	.footTabList{
		display: flex;
		align-items: center;
		justify-content: space-around;
		position: fixed;
		bottom: 0;
		left: 0;
		width: 750rpx;
		font-size: 24rpx;
		z-index: 999;
		box-sizing: border-box;
		padding-top: 12rpx;
		.listitem{
			display: flex;
			flex-direction: column;
			align-items: center;
			width: 100rpx;
			image{
				width: 42rpx;
				height: 42rpx;
				margin-bottom: 15rpx;
			}
		}
	}
</style>
